using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace TONLI.TJOA.Anquan
{
    public partial class AQK_XXCFTWOjf : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ASPxDateEdit1.Value = DateTime.Now.Date;
                ASPxDateEdit2.Value = DateTime.Now.Date;

            }
           
        }

        protected void ASPxButton1_Click(object sender, EventArgs e)
        {
            string s1 = "";
            string s2 = "";
            DateTime dt1 = DateTime.Now.Date;
            DateTime dt2 = DateTime.Now.Date;
            if (ASPxDateEdit1.Text.Trim() != "")
                dt1 = Convert.ToDateTime(ASPxDateEdit1.Value);
            if (ASPxDateEdit2.Text.Trim() != "")
                dt2 = Convert.ToDateTime(ASPxDateEdit2.Value);
            s1 = dt1.ToString();
            s2 = dt2.AddDays(1).ToString();
            Hashtable h1 = new Hashtable();
            h1.Add("p1", String.Format(" fssj>='{0}' and fssj<'{1}' ", s1, s2));
            Session["AQK_XXCFTWO"] = h1;
            ObjectDataSource1.Select();  
        }

        protected void ASPxButton2_Click(object sender, EventArgs e)
        {
            ASPxGridViewExporter1.WriteXlsToResponse(Server.UrlEncode(ASPxGridView1.SettingsText.Title));
        }
    }
}
